package cn.madis.controller;

import cn.madis.domain.User;
import cn.madis.feign.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayController {
   @Autowired
   private UserFeignClient userFeignClient;
    @RequestMapping("/pay/{id}")
    public User getById(@PathVariable Long id){
        return userFeignClient.getUser(id);
    }
}
